package com.liang.provider;

import com.liang.common.service.UserService;
import com.liang.liangrpccore.RpcApplication;
import com.liang.liangrpccore.register.LocalRegister;
import com.liang.liangrpccore.service.HttpService;
import com.liang.liangrpccore.service.VertxHttpServer;


/**
 * 简易向服务者提供示例
 * @author lzw
 */

public class EasyProviderExample {

    public static void main(String[] args) {
        // rpc框架初始化
        RpcApplication.init();

        // 注册服务
        LocalRegister.register(UserService.class.getName(), UserServiceImpl.class);

        // 启动Web服务
        HttpService httpService = new VertxHttpServer();
        httpService.doStart(RpcApplication.getRpcConfig().getServerPort());
    }
}
